package com.estate.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.estate.system.domain.Enquiry;
import com.estate.system.domain.vo.ClientResult;
import com.estate.system.domain.vo.HomeSaleDataView;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 咨询 数据层
 *
 * @author simon
 */
public interface DataEnquiryMapper extends BaseMapper<Enquiry> {
    Long getSevenDayNewEnquire(@Param("beginTime") String beginTime, @Param("endTime") String endTime,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> getEnquireByEnquireType(@Param("beginTime") String beginTime, @Param("endTime") String endTime,@Param("emailList")List<String> emailList);

    int selectTaskCount();

    /**
     * 查询light service客户数量
     */
    int selectLightServiceCount(@Param("beginTime") String beginTime, @Param("endTime") String endTime);

    /**
     * 查询deep service客户数量
     */
    int selectDeepServiceCount(@Param("beginTime") String beginTime, @Param("endTime") String endTime);

    String selectLightServiceEmail(@Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<Map<String, Object>> selectDeepServiceDetail(@Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<Map<String, Object>> getTrendsInRentalAmounts(@Param("paraMap") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> getTrendOfTransactions(@Param("paraMap") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> getRankingOfTransactionsNumber(@Param("paraMap") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> getTrendsInTransactionAmounts(@Param("paraMap")Map<String, Object> paramData,  @Param("emailList")List<String> emailList);

    Map<String, Object> getDauDetail(@Param("paraMap")Map<String, Object> paramData);

    List<Map<String, Object>> getUserActivityTrend(@Param("paraMap")Map<String, Object> paramData);

    List<Map<String, Object>> generateSuburbDistributionData(@Param("paraMap")Map<String, Object> paramData,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> generateServiceTypeData();

    List<Map<String, Object>> generateRecommendationStatusData(@Param("paraMap")Map<String, Object> paramData);

    List<Map<String, Object>> generateConnectionRecommendationData(@Param("paraMap")Map<String, Object> paramData);

    List<Map<String, Object>> createTopAgentsByClientCount(@Param("paraMap")Map<String, Object> paramData,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> createMonthlyTrendPointData(@Param("paraMap")Map<String, Object> paramData,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> createDayOfWeekRequestData(@Param("paraMap")Map<String, Object> paramData,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> createHourlyRequestData(@Param("paraMap")Map<String, Object> paramData,@Param("emailList")List<String> emailList);

    Page<ClientResult> getMessageSent(IPage<ClientResult> page, @Param("bo") ClientResult bo);
}
